package com.openbravo.pos.panels.link.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.viewbean.ProductStoreDiaryView;
import com.openbravo.format.Formats;
import com.openbravo.pos.base.AppLocal;

public class ProductStoreDiaryVTableModel extends AbstractDTOTableModel<ProductStoreDiaryView>{

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		ProductStoreDiaryView value=getObj(rowIndex);
        switch(columnIndex){
            case 0:
                return value.getLocation();
            case 1:
                return value.getProductAttrSetInstDec();
            case 2:
                return  value.getMultiply();
            case 3:
                return value.getBomName();
            case 4:
         	   return Formats.TIMESTAMP.formatValue(value.getDate());
            case 5:
         	   return value.getReason();
            case 6:{
               return value.getLotNo();
            }
        }
        return null;
	}

	@Override
	public String[] getColumnNames() {
		return new String[]{
	            AppLocal.getIntString("label.warehouse"),
	            AppLocal.getIntString("label.attribute"),
	            AppLocal.getIntString("label.storeNum"),
	            AppLocal.getIntString("label.BOM"),
	            AppLocal.getIntString("label.date"),
	            AppLocal.getIntString("label.stockreason"),
	            AppLocal.getIntString("label.lotNo"),
		};
	}

}
